package com.by.feign.client;

import com.by.common.core.bean.ResultBean;
import com.by.common.core.feign.Constant;
import com.by.feign.dto.UserDto;
import com.by.feign.fallback.UserRemoteFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "system-service", fallback = UserRemoteFallback.class)
public interface UserRemoteClient {
    /**
     * 根据用户id查询用户信息
     *
     * @param id
     * @return
     */
    @GetMapping(Constant.PREFIX + "/user")
    ResultBean<UserDto> getById(@RequestParam("id") int id);
}
